package exception

import (
	"gitee.com/xxhsjp/x-core/app"
	"gitee.com/xxhsjp/x-core/enums"
)

var ParamInvalidException = NewTraceError(&ParamInvalid{
	code: enums.ParamInvalid.Code,
	msg:  enums.ParamInvalid.Text,
})

type ParamInvalid struct {
	code string
	msg  string
}

func (e *ParamInvalid) Code() string {
	return app.App.Code + e.code
}

func (e *ParamInvalid) Error() string {
	return e.msg
}
